// We're going to use some command-line facilities, but it may not have initialized yet.
this.initializeCommandLineIfNeeded(context, win);
// Make sure the command line script is attached.
var element = Firebug.Console.getFirebugConsoleElement(context, win);
if (element)
{
var attached = element.getAttribute("firebugCommandLineAttached");
if (!attached)
{
FBTrace.sysout("Firebug console element does not have command line attached its too early for command line", element);
Firebug.Console.logFormatted(["Firebug cannot find firebugCommandLineAttached attribute on firebug console element, its too early for command line", element, win], context, "error", true);
result = Components.utils.evalInSandbox(scriptToEval, sandbox);
} catch (e) {
result = new FBL.ErrorMessage("commandLine.evaluateInSandbox FAILED: " + e, FBL.getDataURLForContent(scriptToEval, "FirebugCommandLineEvaluate"), e.lineNumber, 0, "js", context, null);
}
return result;
},
getSandboxByWindow: function(context, win)
{
for (var i = 0; i < context.sandboxes.length; i++) {
// XXXdolske is accessing .window safe after untrusted script has run?
if (context.sandboxes[i].window === win.wrappedJSObject)